/*
 * PanelDelegate.h  0.4.0 / Dec 05, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
#ifndef PANELDELEGATE_H
#define PANELDELEGATE_H

#include "Cute4jSwing.h"

#include "ContainerDelegate.h"

// PanelDelegate Class. --------------------------------------------------------

/*!
 * \brief Panel Delegate.
 *
 * \author Slobodan Vrkacevic
 * \version 0.4.0
 */
class CUTE4J_EXPORT PanelDelegate : public ContainerDelegate
{
  Q_OBJECT
protected:
  PanelDelegate(JNIEnv *env, jobject obj);
public slots: // native calls
  void setPanelType(JNIEnv *env, jint panelType);
  void setBorderStyle(JNIEnv *env, jint borderStyle);
  void setBorderWidth(JNIEnv *env, jint borderWidth);
public: // native calls
  static jlong newInstance(JNIEnv *env, jobject obj);
public:
  inline QFrame *qFrame() const;
};

// PanelDelegate :: Public Inline Member Function. -----------------------------

/*!
 * \brief Returns QFrame adaptee.
 *
 * \return QFrame adaptee
 */
inline QFrame *PanelDelegate::qFrame() const
{
  return static_cast<QFrame *>(qObject());
}

// Macro Definition. -----------------------------------------------------------

#define PANEL_DELEGATE (reinterpret_cast<PanelDelegate *>(delegate))

#endif // PANELDELEGATE_H
